<template>
  <div>
    <h3>全局事件总线 mitt 库</h3>
    {{}}
    <div class="demo">
      <Child1 />
      <Child2 />
    </div>
    <div>
      <el-button type="primary" @click="passValue">车辆大派送</el-button>
    </div>
  </div>
</template>

<script setup lang="ts">
import mitter from '../../utils/mittBus'
import Child1 from './Child1.vue'
import Child2 from './Child2.vue'

const passValue = () => {
  mitter.emit('SendCar', '奥迪A8')
}
</script>

<style scoped>
.demo {
  display: flex;
  align-items: center;
  justify-content: space-around;
  width: 800px;
}
</style>
../../utils/mittBus
